- Probably going to use Go
- MQTT to communicate
- JSON config file
- List of integrations
- Files providing integration
- syntax for MQTT communication
- List of devices
- Integration
- Id
- Optional options
- IP Address
- port
- type
- etc
- Spawns new process for each integration
- Integration accepts JSON config on command line
- Handle errors from std(out|err)
- NextJS for website
- Framework
- Shadcn
- Chakra
- MUI
- BeerCSS
- Super simple, just controls
- Possibly add settings for devices
- Responsive
- Considerations for
- Maybe reverse engineer the Home Assistant API to make it compatible with the mobile apps
- Check the docs first
- Wireshark the traffic later
⠀⠀
⠀⠀
MQTT Structure
Term | Explanation |
---|---|
orchestrator | Main daemon that monitors integrations and aggregates state updates into an object (main.go) |
namespace | The root-level path used for identifying integrations |
route | The topic of an MQTT message, showing which integration (if any) should process the message |
emitter | A specific type of route where data is published to |
command | A route where, upon receiving a message, invokes a function in the receiving integration |
fetcher | A command that triggers the integration to rebroadcast its data |
managed (integration) | An integration started, stopped, and watched by the orchestrator. Example: kasa.js |
unmanaged (integration) | An integration that is not controlled by the orchestrator and only utilizes the bus. Example: ESP8266 |
⠀⠀
Route | Type | Description |
---|---|---|
/orchestrator | namespace | Reserved namespace for all orchestrator-related functions |
/orchestrator/status | emitter | Status of all integrations as a map |
/orchestrator/state | emitter | State of all integrations. Entries can be null if no state was received |
/orchestrator/error | emitter | Orchestrator-specific error messages |
/orchestrator/getdata/status | fetcher | Triggers emission of status |
/orchestrator/getdata/state | fetcher | Triggers emission of state |
/orchestrator/getdata/fullState | fetcher | Triggers emission of state & status |
/orchestrator/integration/ | emitter | Not handled by orchestrator, integrations emit they are online (true) or not (false) |
/orchestrator/integration/start | command | Attempt to start an integration (if it's managed) |
/orchestrator/integration/ | command | Stop an integration (only if it's managed) |
⠀⠀